﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Leibieshezhi.aspx.cs" Inherits="Catering.Catering_Page.Caipin.Caipin_jcsz.Leibieshezhi" %>

<!DOCTYPE html PUBLIC "-//W3C//Dtd XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/Dtd/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=7" />
    <title>菜品管理</title>
    <link rel="stylesheet" type="text/css" href="../../../../Style/head.css" />
    <link rel="stylesheet" type="text/css" href="../../../../Style/center.css" />
    <link href="../../../../Style/StyleSheet.css" rel="stylesheet" type="text/css" />
    <link href="../../../../Style/jquery.treeview.css" rel="stylesheet" type="text/css" />
    <link href="../../../../Style/tinybox_style.css" rel="stylesheet" type="text/css" />
    <link href="../../../Style/zhezhao.css" rel="stylesheet" type="text/css" />
    <script src="../../../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <script src="../../../Scripts/jquery.js" type="text/javascript"></script>
    <script src="../../../Scripts/jquery.cookie.js" type="text/javascript"></script>
    <script src="../../../Scripts/jquery.treeview.js" type="text/javascript"></script>
    <script src="../../../Scripts/jquery.treeview.edit.js" type="text/javascript"></script>
    <script src="../../../Scripts/tinybox.js" type="text/javascript"></script>
    <script src="../../../../Style/xxk.js" type="text/javascript"></script>
    <script src="../../../Scripts/zhezhao.js" type="text/javascript"></script>
    <link href="/Style/CaipinCss/DishTtyeTree.css" rel="stylesheet" type="text/css" />

    <style type="text/css">
        .Create_Recipe
        {
            margin-top: 0;
        }
        .Create_Recipe
        {
            border: 1px solid #159aec;
            border-top: none;
            width: 998px;
        }
        .soso_lt
        {
            padding: 5px 0;
        }
        .soso_lt a
        {
            margin-left: 3px;
        }
        
        a.add_new1
        {
            position: absolute;
            top: 8px;
            right: 10px;
            background: url(../../Images/jiahao.gif) left center no-repeat;
            padding-left: 15px;
        }
        a.add_new1:link, a.add_new:visited
        {
            color: #de10ab;
        }
        a.add_new1:hover
        {
            color: #000;
        }
        
        a.add_innsert1
        {
            position: absolute;
            top: 8px;
            right: 60px;
            background: url(../../Images/jiahao.gif) left center no-repeat;
            padding-left: 15px;
        }
        a.add_innsert1:link, a.add_innsert:visited
        {
            color: #de10ab;
        }
        a.add_innsert1:hover
        {
            color: #000;
        }
        .swxx_table tbody td{padding:5px;}
        .link_add{background-image:url('../../../Images/link_add.png'); width:57px; height:20px; text-align:right; display:block;}
        
    </style>
    <!---食物类别---->
    <script language="javascript" type="text/javascript">
        //删除食物类别
        function Clear_Raw_Type(RawID) {

            if (!confirm("确定删除?")) {
                return;
            }

            $.ajax({
                type: "Post",
                url: "Leibieshezhi.aspx/Raw_Del",
                data: "{'Raw_Del_Id':'" + RawID + "'}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    if (data.d == "IsCunZai") {
                        alert("该类别下存在原料,无法删除该类！");
                    } else if (data.d == "OK") {
                        alert("删除成功!");
                        history.go(0);
                    }
                }
            });

        }

        //删除原料细类
        function DelRawMaterialsInfoByID(rowid) {
            if (!confirm("确定删除?")) {
                return;
            }

            $.ajax({
                type: "Post",
                url: "Leibieshezhi.aspx/DelRawMaterialsInfoByID",
                data: "{'Raw_Del_Id':'" + rowid + "'}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    if (data.d == "IsCunZai") {
                        alert("该类别下存在原料,无法删除该类！");
                    } else if (data.d == "OK") {
                        alert("删除成功!");
                        history.go(0);
                    }
                }
            });
        }
        //编辑细类
        function select_max_type(date) {
            $("#Max_type_id").val(date);

            $.ajax({
                type: "Post",
                url: "Leibieshezhi.aspx/Select_Max_Type",
                data: "{'strMaxtype':'" + date + "'}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    $("#Myselect").html(data.d[0]);
                    divshow("divmain", "divup");
                }
            });

        }

        

    </script>

    <!---菜品类别---->
    <script language="javascript" type="text/javascript">

        function Clear_Dish_Type(RawID) {
            if (!confirm("确定删除?")) {
                return;
            }

            $.ajax({
                type: "Post",
                url: "Leibieshezhi.aspx/DelDishTypesByid",
                data: "{'id':'" + RawID + "'}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    if (data.d == "IsCunZai") {
                        alert("该类别下存在菜品,无法删除该类！");
                    } else if (data.d == "OK") {
                        alert("删除成功!");
                        history.go(0);
                    }
                }
            });

        }
    </script>

    <!--增加细类-->
    <script language="javascript" type="text/javascript">
        function add_New_row_click() {
            var i = Math.floor(Math.random() * 1000);
            var str_new = " <tr id=\"add_s_" + i + "\" IsAdd=\"true\"><td style=\"width: 50px\">&nbsp;</td>" +
            "<td style=\"width: 150px\"><input type=\"text\" name=\"mintypename\" /></td>" +
            "<td style=\"width: 250px\"><input type=\"text\" name=\"back\" /></td>" +
            "<td><a href='javascript:void(0);' onclick=\"Del_tr('add_s_" + i + "')\"><img src='../../../Images/trash.gif'/></a></td></tr>";

            $("#Myselect").append(str_new);
        }

        function Del_tr(n) {
            $("#" + n).remove();
        }
    </script>


    <!--保存细类-->
    <script language="javascript" type="text/javascript">
        function Row_save_New_row_click() {
            var rawname = "";
            $("#Myselect tr[IsAdd='true']").each(function () {
                var temp1 = $(this).find("input[name='mintypename']").val();
                var temp2 = $(this).find("input[name='back']").val();
                rawname += temp1 + "," + temp2 + "|";
            });

            var RawTypeInfoEdit = "";
            $("#Myselect tr[cid='Edit']").each(function () {
                RawTypeInfoEdit += $(this).attr("uid") + "," + $(this).find("input[name='Name']").val() + "," + $(this).find("input[name='Back']").val() + "|";
            });

            if (rawname == "" && RawTypeInfoEdit=="") {
                divhidel("divmain", "divup");
                return;
            }

            $.ajax({
                type: "Post",
                url: "Leibieshezhi.aspx/butRaw_New_Min_Click",
                data: "{'str':'" + rawname + "','Type_Max_ID':'" + $("#Max_type_id").val() + "','RawTypeInfoEdit':'" + RawTypeInfoEdit + "'}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    if (data.d == "OK") {
                        alert("保存成功！");
                        history.go(0);
                    }
                }
            });
        }
    
    </script>

    <!--食物类别处理-->
    <script type="text/javascript">
        //修改食物大类
        function Tr_Type_Edit(cid) {
            $("#btn_type_Edit").show();
            $("#btn_type_Add").hide();
            $("#Hidcid").val(cid);
            Leibieshezhi.GetTypeby(cid, Load_type);
        }

        function Load_type(data) {
            if (data.value == null) {
                return;
            }
            var ds = data.value;
            if (ds != null && ds.Rows[0] != undefined && typeof (ds) == "object") {
                $("#txt_shiwutype").val(ds.Rows[0].TypeName);
                $("#txt_beizhu").val(ds.Rows[0].Back);
            }
            divshow("div_shiwutype", "divmain");
        }

        //保存修改的原料大类
        function btn_Save_type() {
            var CID = $("#Hidcid").val();
            var TypeName = $("#txt_shiwutype").val();
            var Back = $("#txt_beizhu").val();

            $.ajax({
                type: "Post",
                url: "Leibieshezhi.aspx/Edit_RawMaterials",
                data: "{'CID':'" + CID + "','TypeName':'" + TypeName + "','Back':'" + Back + "'}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    if (data.d == "OK") {
                        alert("保存成功！");
                        history.go(0);
                    }
                }
            });
        }

        //添加原料大类
        function type_Add() {
            $("#btn_type_Edit").hide();
            $("#btn_type_Add").show();
            $("#div_shiwutype input[type='text']").val("");
            divshow("div_shiwutype", "divmain");
        }

        function btn_Add_type() {
            var TypeName = $("#txt_shiwutype").val();
            var Back = $("#txt_beizhu").val();

            $.ajax({
                type: "Post",
                url: "Leibieshezhi.aspx/Add_RawMaterials",
                data: "{'TypeName':'" + TypeName + "','Back':'" + Back + "'}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    if (data.d == "OK") {
                        alert("保存成功！");
                        history.go(0);
                    }
                }
            });
        }

    </script>

    <!--菜类别处理-->
    <script type="text/javascript">
        //修改菜类
        function Dish_Type_Edit(CID) {
            $("#Hidcid").val(CID);
            $("#btn_SaveDish").show();
            $("#btn_AddDish").hide();
            Leibieshezhi.GetDishType(CID, Load_Dish);
        }

        function Load_Dish(data) {
            if (data.value == null) {
                return;
            }
            var ds = data.value;
            if (ds != null && ds.Rows[0] != undefined && typeof (ds) == "object") {
                $("#txt_DishName").val(ds.Rows[0].DT);
                $("#txt_DishBack").val(ds.Rows[0].Back);
                $("#txt_ParentID").val(ds.Rows[0].ParentID);
            }
            divshow("div_caitype", "divmain");
            
        }

        function btn_Save_Dish() {
            var CID=$("#Hidcid").val();
            var DTName = $("#txt_DishName").val();
            var Back = $("#txt_DishBack").val();
            var parentid = $("#txt_ParentID").val();
            $.ajax({
                type: "Post",
                url: "Leibieshezhi.aspx/Edit_DishType",
                data: "{'CID':'" + CID + "','DTName':'" + DTName + "','Back':'" + Back + "','StrParentID':'" + parentid + "'}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    if (data.d == "OK") {
                        alert("保存成功！");
                        history.go(0);
                    }
                }
            });
        }

        //添加菜类
        function Dish_Add(ParentID) {
            $("#btn_SaveDish").hide();
            $("#btn_AddDish").show();
            $("#div_caitype input[type='text']").val("");
            $("#txt_ParentID").val(ParentID)
            divshow("div_caitype", "divmain");
        }

        function btn_Add_Dish() {
            var DTName = $("#txt_DishName").val();
            var Back = $("#txt_DishBack").val();
            var parentid = $("#txt_ParentID").val();
            $.ajax({
                type: "Post",
                url: "Leibieshezhi.aspx/Add_DishType",
                data: "{'DTName':'" + DTName + "','Back':'" + Back + "','StrParentID':'" + parentid + "'}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    if (data.d == "OK") {
                        alert("保存成功！");
                        history.go(0);
                    }
                }
            });
        }

    </script>

    <!--菜细类处理-->
    <script type="text/javascript">
        
        //显示菜细类
        function Dish_Typeinfo_Edit(DishTypeid) {
            $("#Hidcid").val(DishTypeid);

            $.ajax({
                type: "Post",
                url: "Leibieshezhi.aspx/GetDishTypeInfo",
                data: "{'DishTypeID':'" + DishTypeid + "'}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    if (data.d[1] == "OK") {
                        $("#tbody_DishTypeInfo").html(data.d[0]);
                        divshow("div_Dishtypeinfo", "divmain");
                    }
                }
            });
        }

        //添加菜细类
        function add_DishTypeInfo_click() {
            var i = Math.floor(Math.random() * 1000);
            var str_new = " <tr id=\"add_TypeInfo_" + i + "\" cid=\"Add\"><td style=\"width: 50px\">&nbsp;</td>" +
            "<td style=\"width: 150px\"><input type=\"text\" name=\"Name\" /></td>" +
            "<td style=\"width: 250px\"><input type=\"text\" name=\"Back\" /></td>" +
            "<td><a href='javascript:void(0);' onclick=\"Del_tr('add_TypeInfo_" + i + "')\"><img src='../../../Images/trash.gif'/></a></td></tr>";

            $("#tbody_DishTypeInfo").append(str_new);
        }

        //保存菜细类
        function Save_DishTypeInfo() {

            var DishTypeID = $("#Hidcid").val();

            var DishTypeInfo = "";
            $("#tbody_DishTypeInfo tr[cid='Add']").each(function () {
                DishTypeInfo += $(this).find("input[name='Name']").val() + "|" + $(this).find("input[name='Back']").val() + ",";
            });

            var DishTypeInfoEdit = "";
            $("#tbody_DishTypeInfo tr[cid='Edit']").each(function () {
                DishTypeInfoEdit += $(this).attr("uid") + "|" + $(this).find("input[name='Name']").val() + "|" + $(this).find("input[name='Back']").val() + ",";
            });

            if (DishTypeInfo != "" || DishTypeInfoEdit!="") {
                $.ajax({
                    type: "Post",
                    url: "Leibieshezhi.aspx/SaveDishTypeInfo",
                    data: "{'DishTypeID':'" + DishTypeID + "','DishTypeInfo':'" + DishTypeInfo + "','DishTypeInfoEdit':'" + DishTypeInfoEdit + "'}",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (data) {
                        if (data.d == "OK") {
                            alert("保存成功！");
                            window.location = 'Leibieshezhi.aspx';
                        }
                    }
                });
            }
            else {
                divhidel("div_Dishtypeinfo", "divmain");
            }
        }

        //删除细类
        function DelDishTypeInfoByID(DishTypeInfoId) {
            if (!confirm("确定删除？"))
                return;

            $.ajax({
                type: "Post",
                url: "Leibieshezhi.aspx/DelDishTypeInfo",
                data: "{'DishTypeInfoId':'" + DishTypeInfoId + "'}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    if (data.d == "IsCunZai") {
                        alert("该类别下存在菜品,无法删除该类！");
                    } else if (data.d == "OK") {
                        alert("删除成功!");
                        window.location = 'Leibieshezhi.aspx';
                    }
                }
            });
        }

    </script>

    <!--修改菜细类-->
    <script type="text/javascript">
        //修改菜细类
        function EditDishTypeInfoByID(cid) {

            $("#Dish_tr_" + cid).attr("cid", "Edit");
            var strName = $("#Dish_tr_" + cid).find("td[cid='name']").text().toString();
            var strback = $("#Dish_tr_" + cid).find("td[cid='back']").text().toString();
            
            $("#Dish_tr_" + cid).find("td[cid='name']").html("<input type=\"text\" value=\"" + strName + "\" name=\"Name\" style=\"width:100%\"/>");
            $("#Dish_tr_" + cid).find("td[cid='back']").html("<input type=\"text\" value=\"" + strback + "\" name=\"Back\" style=\"width:100%\"/>");
        }

        //修改原料细类
        function EditRawTypeInfoByID(cid) {
            $("#Raw_tr_" + cid).attr("cid", "Edit");
            var strName = $("#Raw_tr_" + cid).find("td[cid='name']").text().toString();
            var strback = $("#Raw_tr_" + cid).find("td[cid='back']").text().toString();

            $("#Raw_tr_" + cid).find("td[cid='name']").html("<input type=\"text\" value=\"" + strName + "\" name=\"Name\" style=\"width:100%\"/>");
            $("#Raw_tr_" + cid).find("td[cid='back']").html("<input type=\"text\" value=\"" + strback + "\" name=\"Back\" style=\"width:100%\"/>");
        }
    </script>

    <!--树形菜品分类-->
    <script type="text/javascript">
        function Fid(id) { return document.getElementById(id); }
        function Ftag(name) { return document.getElementsByTagName(name); }

        function rowView(id) {
            var oRow = Fid("SubItem" + id);
            if (oRow) {
                var oIcon = Fid("Icon" + id);
                if (oRow.style.display != "block") {
                    oRow.style.display = "block";
                    if (oIcon) {
                        oIcon.src = "/images/Tree/folder3.gif";
                    }
                }
                else {
                    oRow.style.display = "none";
                    if (oIcon) {
                        oIcon.src = "/images/Tree/folder4.gif";
                    }
                }
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:HiddenField ID="Hidcid" runat="server" />
    <asp:HiddenField ID="Max_type_id" runat="server" Value="0" />    
    <div class="Center_Content" id="div2_3">
        <div class="Create_Recipe">
        <table align="center" width="978">
            <tr>
                <td width="484">
                    <div class="div_0207 left_width400" style="height: 500px; width: 100%;">
                        <table width="100%" style="background:url('../../../Images/div_h1_bg.gif');" cellpadding="0" cellspacing="0" border="0">
                            <tr>
                                <td><h1><img src="../../../Images/cp_h1_03.gif" />原料类别</h1></td>
                                <td align="right"><a href="javascript:void(0);" onclick="type_Add()" class="link_add"> </a></td>
                            </tr>
                        </table>
                        <div style="width: 100%; height: 470px; overflow-y: auto;">
                            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="swxx_table">
                                <thead>
                                    <tr>
                                        <td width="12%">序号</td>
                                        <td width="48%">原料类别</td>
                                        <td width="18%">编辑细类</td>
                                        <td colspan="2" width="22%">操作</td>
                                    </tr>
                                </thead>
                                <tbody id="raw_type">
                                    <asp:Repeater ID="Rep_RawMaterials" runat="server">
                                        <ItemTemplate>
                                            <tr id="upadd_<%#Eval("id")%>" style="background:#ffffff;" onmouseover="this.style.background='#E3F5FF'" onmouseout="this.style.background='#FFFFFF'">
                                                <td class="xh_td"><%#Eval("id")%></td>
                                                <td><%#Eval("TypeName")%></td>
                                                <td align="center"><img src="../../../Images/sz03.png" style="cursor: pointer;" onclick="select_max_type('<%#Eval("id")%>')" /></td>
                                                <td align="center"><img src="../../../Images/file.gif" style="cursor: pointer;" onclick="Tr_Type_Edit('<%#Eval("id")%>')" /></td>
                                                <td align="center"><img src="../../../Images/trash.gif" style="cursor: pointer;" onclick="Clear_Raw_Type('<%#Eval("id")%>')" /></td>
                                            </tr>
                                        </ItemTemplate>
                                    </asp:Repeater>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </td>
                <td width="10"></td>
                <td width="484">
                    <div class="div_0207 left_width400" style="height: 500px; width: 100%;">
                        <table width="100%" style="background:url('../../../Images/div_h1_bg.gif');" cellpadding="0" cellspacing="0" border="0">
                            <tr>
                                <td><h1><img src="../../../Images/cp_h1_03.gif" />菜品类别</h1></td>
                                <td align="right"><a href="javascript:void(0);" class="link_add" onclick="Dish_Add(0)"> </a></td>
                            </tr>
                        </table>
                        <div style="width: 100%; height: 470px; overflow-y: auto;">
                            <div class="DishTypeTreeTitle">
                                <ul>
                                    <li class="WidthID">类别ID</li>
                                    <li class="WidthName">菜品类别</li>
                                    <li class="WidthOperate">操作</li>
                                </ul>
                            </div>
                            <div class="DishTypeTree">
                                <%=this.GetDistTypeHtml()%>
                                <%--<ul id="row1">  无限节点模板
                                    <li class="WidthID">1</li>
                                    <li class="WidthName"><a href="javascript:void(0);" onclick="rowView(1)"><img src="/Images/Tree/folder4.gif" id="Icon1"/>测试类别</a></li>
                                    <li class="WidthOperate"><a>添加子类</a> | <a>修改</a> | <a>删除</a></li>
                                </ul>
                                <div class="displaynone" id="SubItem1">
                                    <ul id="row4">
                                        <li class="WidthID">4</li>
                                        <li class="WidthName"><img src="/Images/Tree/line1.gif" /><a href="javascript:void(0);" onclick="rowView(4)"><img src="/Images/Tree/folder4.gif" id="Icon4"/>测试类别4</a></li>
                                        <li class="WidthOperate"><a>添加子类</a> | <a>修改</a> | <a>删除</a></li>
                                    </ul>
                                    <div class="displaynone" id="SubItem4">
                                        <ul id="row6">
                                            <li class="WidthID">6</li>
                                            <li class="WidthName"><img src="/Images/Tree/line3.gif" /><img src="/Images/Tree/line1.gif"  onclick="rowView(6)"/><a href="javascript:void(0);"><img src="/Images/Tree/folder3.gif" id="Icon6"/>测试类别6</a></li>
                                            <li class="WidthOperate"><a>添加子类</a> | <a>修改</a> | <a>删除</a></li>
                                        </ul>
                                    </div>
                                    <ul id="row5">
                                        <li class="WidthID">5</li>
                                        <li class="WidthName"><img src="/Images/Tree/line2.gif" /><a href="javascript:void(0);" onclick="rowView(5)"><img src="/Images/Tree/folder3.gif" id="Icon5"/>测试类别5</a></li>
                                        <li class="WidthOperate"><a>添加子类</a> | <a>修改</a> | <a>删除</a></li>
                                    </ul>
                                </div>--%>
                            </div>
                            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="swxx_table">
                                <tbody id="Dish_Type">
                                   <%-- <%
                                        if (this.dt_caipinType != null && this.dt_caipinType.Rows.Count > 0)
                                        {
                                            for (int i = 0; i < this.dt_caipinType.Rows.Count; i++)
                                            { 
                                    %>
                                    <tr id="upadd_<%=this.dt_caipinType.Rows[i]["id"].ToString() %>" style="background:#ffffff;" onmouseover="this.style.background='#E3F5FF'" onmouseout="this.style.background='#FFFFFF'">
                                        <td class='xh_td'>
                                            <%=(i+1) %>
                                        </td>
                                        <td>
                                            <%=this.dt_caipinType.Rows[i]["DT"].ToString() %>
                                        </td>
                                        <td>
                                            <%=this.dt_caipinType.Rows[i]["id"].ToString() %>
                                        </td>
                                        <td>
                                            <%=this.dt_caipinType.Rows[i]["ParentID"].ToString() %>
                                        </td>
                                        <td align='center'>
                                            <img src='../../../Images/sz03.png' style="cursor: pointer;" onclick="Dish_Typeinfo_Edit('<%=this.dt_caipinType.Rows[i]["id"].ToString() %>')" />
                                        </td>
                                        <td align='center'>
                                            <img src='../../../Images/file.gif' style="cursor: pointer;" onclick="Dish_Type_Edit('<%=this.dt_caipinType.Rows[i]["id"].ToString() %>')" />
                                        </td>
                                        <td align='center'>
                                            <img src='../../../Images/trash.gif' style="cursor: pointer;" onclick="Clear_Dish_Type('<%=this.dt_caipinType.Rows[i]["id"].ToString() %>')" />
                                        </td>
                                    </tr>
                                    <%
                                            }
                                        }
                                    %>--%>
                                </tbody>
                            </table>

                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan="3" height="10"></td>
            </tr>
        </table>
        </div>
    </div>
    <!--遮罩层-->
    <div id="divmain" class="bg">
    </div>
    <!--食物细类-->
    <div id="divup" class="center_div" style="padding:0px; margin-top: -150px;">
        <div class="div_0207" style="width:478px; margin-top:0px;">
            <table border="0" cellpadding="0" cellspacing="0" width="100%" style="background-color:#E5F1FD;">
                <tr>
                    <td><h1 style="background-image:none;"><img src="../../../Images/cp_h1_03.gif" />原料细类</h1></td>
                    <td width="36" align="center"><a href="javascript:void(0);" onclick="divhidel('divmain','divup')">关闭</a></td>
                </tr>
            </table>
        </div>
        <table border="0" cellpadding="0" cellspacing="0" width="100%">
            <tr>
                <td colspan="3">
                    <div style="height:200px; overflow-y:auto; overflow-x:hidden;">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="swxx_table">
                            <thead>
                                <tr>
                                    <td width="10%">序号</td>
                                    <td width="35%">细类名称</td>
                                    <td width="35%">备注</td>
                                    <td width="20%">操作</td>
                                </tr>
                            </thead>
                            <tbody id="Myselect"></tbody>
                        </table>
                    </div>
                </td>
            </tr>
            <tr>
                <td height="50" align="right"><a href="javascript:void(0)" onclick="add_New_row_click()" class="input_btn_a">增　加</a></td>
                <td width="20"></td>
                <td><a href="javascript:void(0);" onclick="Row_save_New_row_click()" class="input_btn_a">保　存</a></td>                
            </tr>
        </table>
    </div>
    <!--食物类别-->
    <div id="div_shiwutype" class="center_div" style="margin-top: -150px; padding:0px;">
        <div class="div_0207" style="width:478px; margin-top:0px;"><h1><img src="../../../Images/cp_h1_03.gif" />原料类别</h1></div>
        <table width="100%" cellpadding="0" cellspacing="0" border="0">
            <tr>
                <td width="75" height="40" align="right">类别名称：</td>
                <td colspan="3"><input class="input_bg" style="width:150px;" type="text" id="txt_shiwutype" /></td>
            </tr>
            <tr>
                <td align="right">备　　注：</td>
                <td colspan="3" height="60"><textarea class="input_bg" style="width:380px; height:50px;" id="txt_beizhu" ></textarea></td>
            </tr>
            <tr>
                <td height="50"></td>
                <td width="130" align="right">
                    <input type="button" id="btn_type_Edit" class="input_btn_a" value="提　交" onclick="btn_Save_type()" />
                    <input type="button" id="btn_type_Add" class="input_btn_a" value="提　交" onclick="btn_Add_type()" />
                </td>
                <td width="20"></td>
                <td align="left">
                    <input type="button" id="Button2" class="input_btn_a" value="取　消" onclick="divhidel('div_shiwutype', 'divmain')" />
                </td>
            </tr>
        </table>
    </div>

    <!--菜谱类别-->
    <div id="div_caitype" class="center_div" style="padding:0px; margin-top: -150px;">
        <div class="div_0207" style="width:478px; margin-top:0px;"><h1><img src="../../../Images/cp_h1_03.gif" />菜谱类别</h1></div>
        <table width="100%" cellpadding="0" cellspacing="0" border="0">
            <tr>
                <td width="75" height="40" align="right">菜品类别：</td>
                <td colspan="3"><input class="input_bg" type="text" id="txt_DishName" /></td>
            </tr>
            <tr>
                <td width="75" height="40" align="right">父 节 点：</td>
                <td colspan="3"><input class="input_bg" type="text" id="txt_ParentID" /></td>
            </tr>
            <tr>
                <td align="right">备注：</td>
                <td colspan="3" height="60"><textarea class="input_bg" id="txt_DishBack" style="width:380px; height:50px;"></textarea></td>
            </tr>
            <tr>
                <td height="50"></td>
                <td width="130" align="right">
                    <input type="button" id="btn_SaveDish" class="input_btn_a" value="提　交" onclick="btn_Save_Dish()" />
                    <input type="button" id="btn_AddDish" class="input_btn_a" value="提　交" onclick="btn_Add_Dish()" />
                </td>
                <td width="20"></td>
                <td align="left">
                    <input type="button" id="Button1" class="input_btn_a" value="取　消" onclick="divhidel('div_caitype', 'divmain')" />
                </td>
            </tr>
        </table>
    </div>

    <!--菜细类-->
    <div id="div_Dishtypeinfo" class="center_div" style="padding:0px; margin-top: -150px;">
        <div class="div_0207" style="width:478px; margin-top:0px;">
            <table border="0" cellpadding="0" cellspacing="0" width="100%" style="background-color:#E5F1FD;">
                <tr>
                    <td><h1 style="background-image:none;"><img src="../../../Images/cp_h1_03.gif" />菜品细类</h1></td>
                    <td width="36" align="center"><a href="javascript:void(0);" onclick="divhidel('div_Dishtypeinfo','divmain')">关闭</a></td>
                </tr>
            </table>
        </div>
        <table border="0" cellpadding="0" cellspacing="0" width="100%">
            <tr>
                <td colspan="3">
                    <div style="height:200px; overflow-y:auto; overflow-x:hidden;">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="swxx_table">
                            <thead>
                                <tr>
                                    <td width="10%">序号</td>
                                    <td width="35%">细类名称</td>
                                    <td width="35%">备注</td>
                                    <td width="20%">操作</td>
                                </tr>
                            </thead>
                            <tbody id="tbody_DishTypeInfo"></tbody>
                        </table>
                    </div>
                </td>
            </tr>
            <tr>
                <td height="50" align="right"><a href="javascript:void(0)" onclick="add_DishTypeInfo_click()" class="input_btn_a">增　加</a></td>
                <td width="20"></td>
                <td><a href="javascript:void(0);" onclick="Save_DishTypeInfo()" class="input_btn_a">保　存</a></td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
